﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using Command;
using Entity;

namespace DAL
{
    public class T_Userinfo
    {
        //获取用户的个人信息
        public static SqlDataReader UserInfomaction(UserInfo us)
        {
            string sql = string.Format("select * from UserInfo where UserId='{0}'", us.UserId);
            return DBHelper.Getdata(sql);
        }

        //填写用户反馈
        public static bool UFk(FeedBack fk)
        {
            string sql = string.Format("INSERT INTO FeedBack VALUES('{0}','{1}','{2}','{3}','{4}')", fk.UserId,fk.BookId,fk.FeedBackValue,fk.FeedBackDate,fk.FeedBackState);
            return DBHelper.Adddata(sql)>0;
        }
    }
}
